/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.apache.struts2.json.annotations.JSON;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "t_channels")
//@NamedQueries({@NamedQuery(name = "TChannels.findAll", query = "SELECT t FROM TChannels t"), @NamedQuery(name = "TChannels.findByChannelId", query = "SELECT t FROM TChannels t WHERE t.channelId = :channelId"), @NamedQuery(name = "TChannels.findByServiceCode", query = "SELECT t FROM TChannels t WHERE t.serviceCode = :serviceCode"), @NamedQuery(name = "TChannels.findByChannelName", query = "SELECT t FROM TChannels t WHERE t.channelName = :channelName"), @NamedQuery(name = "TChannels.findByFunctionName", query = "SELECT t FROM TChannels t WHERE t.functionName = :functionName"), @NamedQuery(name = "TChannels.findByStatus", query = "SELECT t FROM TChannels t WHERE t.status = :status"), @NamedQuery(name = "TChannels.findByOrdered", query = "SELECT t FROM TChannels t WHERE t.ordered = :ordered"), @NamedQuery(name = "TChannels.findByCreatedDate", query = "SELECT t FROM TChannels t WHERE t.createdDate = :createdDate"), @NamedQuery(name = "TChannels.findByPreviousId", query = "SELECT t FROM TChannels t WHERE t.previousId = :previousId"), @NamedQuery(name = "TChannels.findByPrimalId", query = "SELECT t FROM TChannels t WHERE t.primalId = :primalId"), @NamedQuery(name = "TChannels.findByLevel", query = "SELECT t FROM TChannels t WHERE t.level = :level")})
public class TChannels implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "channel_id")
    private String channelId;
    @Column(name = "service_code")
    private String serviceCode;
    @Column(name = "channel_name")
    private String channelName;
    @Column(name = "channel_comment")
    private String channelComment;
    @Column(name = "function_name")
    private String functionName;
    @Column(name = "channel_type")
    private String channelType;
    @Column(name = "status")
    private String status;
    @Column(name = "ordered")
    private Integer ordered;
    @Column(name = "created_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createdDate;
    @Column(name = "previous_id")
    private String previousId;
    @Column(name = "primal_id")
    private String primalId;
    @Column(name = "level")
    private String level;
    @Column(name = "channel_classifying_label")
    private String channelClassifyingLabel;
    @Column(name = "channel_hot_topics")
    private String channelHotTopics;
    @OneToMany(mappedBy = "channelId")
    private List<NewsExtendsChannel> newsExtendsChannelList;
    @OneToMany(mappedBy = "channelId")
    private List<NewsExtendsFirstchannel> newsExtendsFirstchannelList;

    public TChannels() {
    }

    public TChannels(String channelId) {
        this.channelId = channelId;
    }

    public String getChannelId() {
        return channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    public String getServiceCode() {
        return serviceCode;
    }

    public void setServiceCode(String serviceCode) {
        this.serviceCode = serviceCode;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public String getFunctionName() {
        return functionName;
    }

    public void setFunctionName(String functionName) {
        this.functionName = functionName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getOrdered() {
        return ordered;
    }

    public void setOrdered(Integer ordered) {
        this.ordered = ordered;
    }

    public Date getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }

    public String getPreviousId() {
        return previousId;
    }

    public void setPreviousId(String previousId) {
        this.previousId = previousId;
    }

    public String getPrimalId() {
        return primalId;
    }

    public void setPrimalId(String primalId) {
        this.primalId = primalId;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    @JSON(serialize=false)
    public List<NewsExtendsChannel> getNewsExtendsChannelList() {
        return newsExtendsChannelList;
    }

    public void setNewsExtendsChannelList(List<NewsExtendsChannel> newsExtendsChannelList) {
        this.newsExtendsChannelList = newsExtendsChannelList;
    }

    @JSON(serialize=false)
    public List<NewsExtendsFirstchannel> getNewsExtendsFirstchannelList() {
        return newsExtendsFirstchannelList;
    }

    public void setNewsExtendsFirstchannelList(List<NewsExtendsFirstchannel> newsExtendsFirstchannelList) {
        this.newsExtendsFirstchannelList = newsExtendsFirstchannelList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (channelId != null ? channelId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TChannels)) {
            return false;
        }
        TChannels other = (TChannels) object;
        if ((this.channelId == null && other.channelId != null) || (this.channelId != null && !this.channelId.equals(other.channelId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.TChannels[channelId=" + channelId + "]";
    }

	/**
	 * channelType
	 *
	 * @return  the channelType
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public String getChannelType() {
		return channelType;
	}

	/**
	 * @param channelType the channelType to set
	 */
	public void setChannelType(String channelType) {
		this.channelType = channelType;
	}

	/**
	 * channelComment
	 *
	 * @return  the channelComment
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public String getChannelComment() {
		return channelComment;
	}

	/**
	 * @param channelComment the channelComment to set
	 */
	public void setChannelComment(String channelComment) {
		this.channelComment = channelComment;
	}

	/**
	 * channelClassifyingLabel
	 *
	 * @return  the channelClassifyingLabel
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public String getChannelClassifyingLabel() {
		return channelClassifyingLabel;
	}

	/**
	 * @param channelClassifyingLabel the channelClassifyingLabel to set
	 */
	public void setChannelClassifyingLabel(String channelClassifyingLabel) {
		this.channelClassifyingLabel = channelClassifyingLabel;
	}

	/**
	 * channelHotTopics
	 *
	 * @return  the channelHotTopics
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public String getChannelHotTopics() {
		return channelHotTopics;
	}

	/**
	 * @param channelHotTopics the channelHotTopics to set
	 */
	public void setChannelHotTopics(String channelHotTopics) {
		this.channelHotTopics = channelHotTopics;
	}

}
